import request from '@/utils/request'

// 查询绿证管理列表
export function listCertificate(query) {
  return request({
    url: '/greenCertificate/certificate/list',
    method: 'get',
    params: query
  })
}

// 查询绿证管理详细
export function getCertificate(id) {
  return request({
    url: '/greenCertificate/certificate/' + id,
    method: 'get'
  })
}

// 新增绿证管理
export function addCertificate(data) {
  return request({
    url: '/greenCertificate/certificate/addGreenCertificate',
    method: 'post',
    data: data
  })
}

// 修改绿证管理
export function updateCertificate(data) {
  return request({
    url: '/greenCertificate/certificate/updateGreenCertificate',
    method: 'put',
    data: data
  })
}

// 删除绿证管理
export function delCertificate(id) {
  return request({
    url: '/greenCertificate/certificate/' + id,
    method: 'delete'
  })
}

// 导出绿证管理
export function exportCertificate(query) {
  return request({
    url: '/greenCertificate/certificate/export',
    method: 'get',
    params: query
  })
}

// 查询售方挂牌情况
export function listSeller(query) {
  return request({
    url: '/carbon/seller/list',
    method: 'get',
    params: query
  })
}
// 查询售方挂牌情况
export function listPurchaser(query) {
  return request({
    url: 'carbon/purchaser/list',
    method: 'get',
    params: query
  })
}